package com.itheima;

public class Test {


    public static void main(String[] args) {

        Eatable e = new Cat();
        useEatable(e);

    useEatable(new Eatable() {
        @Override
        public void eat() {
            System.out.println("匿名内部类实现了");
        }
    });

    useEatable(() ->{ System.out.println("lamdba类实现了");});



    }

    public static void useEatable(Eatable e){

        e.eat();
    }
}
